<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>提示</title>
<style type="text/css">
body{ font-family:"黑体"; background:#e1e8f3}
.b{	
	 border-bottom-left-radius:5px; 
	 border-bottom-right-radius:5px;
	 border-top-left-radius:5px; 
	 border-top-right-radius:5px;
	 border-width:1px; 
	 border-style:solid;
 	 border-top-color:#adadaf;
 	 border-right-color:#adadaf; 
 	 border-bottom-color:#adadaf; 
	 border-left-color:#adadaf;
	 line-height:20px;
     font-size:14px;
	 padding:7px 10px;
	 margin:10px 0;
     background:#fff;
}
    .no-bor{ border:none; height:20px; font-size:14px; padding:0 3px; line-height:20px; color:#666; width:30px}
.color-green{ color:#749b02}
.color-gray{ color:#989898}
.color-orange{ color:#fc6b00}
.head{ text-align:center; border-bottom:1px #e0e0e0 solid; line-height:25px; font-size:14px; margin-bottom:10px;}

</style>
<script>

function count() {

    var day = document.getElementById('day');
    if (day.value.length > 0 && !(day.value > 0)) {
        location.href='open:alert';
        day.value = day.value.substring(0, day.value.length - 1);
    }
    
    var total = document.getElementById('day').value * document.getElementById('adUnitPrice').innerHTML;
    document.getElementById('count').innerHTML = total;
    document.getElementById('count2').innerHTML = total;
    
    if (total > document.getElementById('balance').innerHTML) {
        document.getElementById('nomoney').style.display = 'block';
        document.getElementById('enough').style.display = 'none';
    }
    else {
        document.getElementById('nomoney').style.display = 'none';
        document.getElementById('enough').style.display = 'block';
    }
}
    
function lost_focus() {

    document.getElementById('day').style.border='none';

    var day = document.getElementById('day');
    if (day.value.length == 0) {
        day.value = 1;
        count();
    }
}


</script>
</head>
<body>
<div class="b">
  <label for="day"><strong>推荐天数:</strong></label>
  <input type="text" id="day" min='1' onClick="javascript:this.style.border='1px #ddd solid'" onBlur="javascript:lost_focus();" placeholder="" style="outline:none" class="no-bor" value="1" onInput="javascript:count();"> 天
</div>
<div class="b">
    <strong>服务费用：</strong><font class="color-gray" id="count">0</font><font class="color-gray">元</font>
</div>
<div class="b">
    <strong>当前账户：</strong><font class="color-gray" id="name"></font><br>
    <strong>可用余额：</strong><font class="color-green" id="balance">0</font><font class="color-green">元</font>
</div>
<div class="b" id='nomoney' style='display:none'>
    <font class="color-orange"><strong>你的账户余额不足，请立即充值或者减少推荐天数</strong></font><br>
    <input type='button' value='立即充值' onClick="javascript:location.href='open:recharge';">
</div>
<div class="b" id='enough'>
    <strong><span class="color-green">您的余额足够支付服务费</span><span class="color-orange" id='count2'>100</span><span class="color-orange">元</span><span class="color-green">，请放心购买</span></strong>
</div>
<div class="b">
    <div class="head">服务条款</div>
1. 开通商品推荐服务，需要通过管理员审核操作<br>
2. 如果审核不通过，会直接将服务费用返还到你的账户余额中<br>
3. 如果审核通过，则在你申请的推荐天数内，都会在圈子商讯的最前排，向所有的用户展示你申请推荐的商品信息
<div>
<span id='adUnitPrice' style='display:none'>0</span>
</body>
</html>
